#where to log
logpath=/var/log/mongo/mongos.log

logappend=true

# fork and run in background
fork = true

port = {{ mongos_port }}
{% set hosts = '' %}
 {% for host in groups['mongoc_servers'] %}
   {% if loop.last %}
      {% set hosts = hosts + host + ':' ~ mongoc_port  %}
       configdb = {{ hosts }}
      {% else %}
        {% set hosts = hosts + host + ':' ~ mongoc_port + ','  %}
   {% endif %}
 {% endfor %}

# location of pidfile
pidfilepath = /var/run/mongodb/mongos.pid
keyFile={{ mongodb_datadir_prefix }}/secret
chunkSize={{ mongos_chunk_size }}
